﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EvolutionBaseType;
using Evolution.Structure.Globe.Fields;
using EvolutionBaseTypes.Interfaces;
using System.ComponentModel;

namespace Evolution.Structure.Globe.Details.Cities
{
    public class City : WorldItem
    {
        public string Name { get; set; }
        public List<Building> Buildings { get; set; }

        public BindingList<Field> ByCultureInfluencedArea { get; set; }
        public Dictionary<Point, Field> WorkingArea { get; private set; }
        public List<Citizen> Citizens { get; private set; }
        public Resources GeneratedResources { get; private set; }
        
        public Queue<IBuildable> ConstructingQueue { get; private set; }
        public double ConstructingExpenses { get; set; }


        public City(Point position, WorldItem field, string cityname) : base(position, field)
        {
            this.Name = cityname;
            this.Position = position;
            this.ParentWorldItem = field;
            Buildings = new List<Building>();
            ByCultureInfluencedArea = new BindingList<Field>();
            Citizens = new List<Citizen>();
            GeneratedResources = new Resources();
            ConstructingQueue = new Queue<IBuildable>();
            WorkingArea = new Dictionary<Point, Field>();
        }

        public override String ToString()
        {
            if (Name == null) return base.ToString();
            return Name;
        }
    }
}
